<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

        .pant {
            margin: 0 auto;

            width: 275px;

            height: 310px;

            border: 2px solid #bbb;
        }

        #scred {
            width: 200px;

            height: 40px;

            border: 1px solid #bbb;

            margin: 7px 0px 0px 7px;

            float: left;
        }

        input {
            font-size: 20px;

            width: 50px;

            height: 50px;

            margin: 6px;
        }
    </style>
    <script src="static/jquery.js"></script>
</head>
<body>
<div class="pant">
    <div>
        <p id="scred"></p>
        <input type="button" id="C" value="C">
    </div>
    <div>
        <input type="button" value="7">
        <input type="button" value="8">
        <input type="button" value="9">
        <input type="button" value="/">
        <input type="button" value="4">
        <input type="button" value="5">
        <input type="button" value="6">
        <input type="button" value="*">
        <input type="button" value="1">
        <input type="button" value="2">
        <input type="button" value="3">
        <input type="button" value="-">
        <input type="button" value="0">
        <input type="button" value=".">
        <input type="button" value="=">
        <input type="button" value="+">
    </div>
</div>

<script>
    $(function(){
        var clickBtn = "";
        $(":button").click(function(){
            if($(this).val() == 'C'){
                clickBtn = "";
                return $("#scred").text("");
            }else if($(this).val() == '='){
                $.ajax({
                    type:"get",
                    url:"jsq",
                    data:{
                        'clickBtn':clickBtn,
                    },
                    success:function (clickBtn){
                        $("#scred").text(clickBtn);
                    }
                });
                    clickBtn = '';
            }else {
                clickBtn += $(this).val();
            }

             return $("#scred").text(clickBtn);
        })

        $("#scred").click(function(){

        })
    })
</script>
</body>
</html>